<template>
  <div style="padding: 20px">
    <div style="display: flex; justify-content: space-between">
      <div>第n局</div>
      <div @click="showSheet = true">设置</div>
    </div>
    <div style="text-align: center">桌面分0</div>
    <div style="display: flex">
      <div style="flex: 1">
        <div style="margin-top: 20rpx;">111</div>
        <div style="margin-top: 20rpx;">111</div>
        <div style="margin-top: 20rpx;">111</div>
        <div style="margin-top: 20rpx;">111</div>
        <div style="margin-top: 20rpx;">111</div>
        <div style="margin-top: 20rpx;">111</div>
      </div>
      <div style="flex: 8; height: 90vh">
        <van-row>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
          <van-col style="margin-top: 20rpx;" span="8">span: 8</van-col>
        </van-row>
      </div>
    </div>
    <div>
        
    </div>

    <!-- 设置项 -->
    <van-action-sheet :show="showSheet" :actions="actions" @select="onSelect" />
  </div>
</template>
  
  <script setup>
import { ref, onMounted } from "vue";
import { showToast } from "vant";

const showSheet = ref(false);
const actions = [
  { name: "选项一", icon: "cart-o" },
  { name: "选项二", icon: "shop-o" },
  { name: "选项三", icon: "star-o" },
  { name: "取消", icon: "cancel" },
];

// 选择了设置项
const onSelect = (item) => {
  showSheet.value = false;
  showToast(item.name);
};
onMounted(() => {
  console.log("oooooo");
  const token = uni.getStorageSync("cxl_token");
  console.log("token", token);
  if (!token) uni.reLaunch({ url: "/pages/login/index" });
});
</script>
  
  <style lang="less" scoped>
</style>